package com.test.gk.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

public class MyFormatter extends Formatter {
    @Override
    public String format(LogRecord record) {
        return String.format("[%s] %s - %s %s : %s\r\n",
                record.getLevel().getName(),
                LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
                Thread.currentThread().getName(),
                record.getLoggerName(),
                record.getMessage()
        );
    }
}
